home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
pgm_tool
/
lu62
/
proc
/
copy.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-03
|
518b
|
32 lines
/*
*
* Copy string "in" in string "out"
* and set rest of string "out" to blanks.
*
*
* CopyRight 1995. Nicholas Poljakov all rights reserved.
*
*/
#include <string.h>
#include <memory.h>
copy (char *out, char *in, int l)
{
int i;
if (l <= 0) {
return -1;
}
i = strlen(in);
if (i > l) {
return -1;
}
else
memcpy(out, in, i);
if (i == l) {
return 0;
}
memset(&out[i], 32, l - i);
return 0;
}